package com.expand.learn.controller;

import com.expand.learn.model.Human;
import com.expand.learn.model.Person;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanghaidong
 * @version v1.0
 * @description
 * @date 2020/2/26
 */
@RestController
@RequestMapping("/spring/expand")
public class TestController {

    @RequestMapping(value = "/getPerson", method = RequestMethod.POST)
    public Person parsePerson(Human human) {
        final Person person = human.getPerson();
        System.out.println(" test controller ----" +person.toString());
        return person;
    }
}
